package com.esri.core.geometry;

/* loaded from: classes.dex */
class SimpleJsonCursor extends JsonCursor {
    String a;
    String[] b;
    int c;
    int d;

    public SimpleJsonCursor(String str) {
        this.a = str;
        this.c = -1;
        this.d = 1;
    }

    public SimpleJsonCursor(String[] strArr) {
        this.b = strArr;
        this.c = -1;
        this.d = strArr.length;
    }

    @Override // com.esri.core.geometry.JsonCursor
    public int getID() {
        return this.c;
    }

    @Override // com.esri.core.geometry.JsonCursor
    public String next() {
        int i = this.c;
        if (i < this.d - 1) {
            int i2 = i + 1;
            this.c = i2;
            String str = this.a;
            return str != null ? str : this.b[i2];
        }
        return null;
    }
}
